Skip to content

Commit

Permalink
Fallback for the failing process.memoryUsage()
Browse files Browse the repository at this point in the history
  • Loading branch information
Román Lisin committed Nov 7, 2019
1 parent 1ec3190 commit c8ed160
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/reporters/base-reporter.js
Expand Up @@ -170,7 +170,12 @@ export default class BaseReporter {
}

checkPeakMemory() {
const {heapTotal} = process.memoryUsage();
let heapTotal;
try {
{heapTotal} = process.memoryUsage();
} catch(e) {
heapTotal = 1000000;
}
if (heapTotal > this.peakMemory) {
this.peakMemory = heapTotal;
}
Expand Down

0 comments on commit c8ed160

Please sign in to comment.